Method for editing continual vertical line of visual programming language

ABSTRACT

A method for editing continual vertical line of visual programming language includes following steps: entering an editing mode; selecting a source node as a current node from a serial-parallel graphic where the source node is an endpoint of one of a plurality of normal blocks in the graphic; calculating and displaying one or more candidate nodes around current node; connecting the current node to any one of the candidate nodes for converting the connected candidate node into a connected node; setting the connected node as the current node for continually calculating, displaying, connecting to one or more candidate nodes before exiting the editing mode; generating a continual vertical line according to the source node and the one or more connected nodes when exiting the editing mode; modifying the serial-parallel relationship among the plurality of normal blocks in the graphic and updating the graphic according to the continual vertical line.

BACKGROUND OF THE INVENTION 1. Technical field

The present invention relates to an editing method of visual programminglanguage, especially to a method for editing continual vertical line ofvisual programming language.

2. Description of Prior Art

Generally, user may edit the logic connection relationship (such asserial or parallel relationship) among virtual industrial controlequipment by visual programming language editor. Therefore, user caneasily determine the combination of various industrial control equipmentfor automatic operation and set up desired system architecture.

The current visual programming language editor, such as ladder diagrameditor, mainly assigns a user command to an operation for editing. Useris allowed to add only one vertical line at one time when user wants tochanges the connection relationship among the various device blocks(also referred to as normal block, and corresponding to various virtualequipment). Namely, user needs to send plurality of commandssuccessively when he/she needs to construct a plurality of verticallines. This is really troublesome.

In the operation of current editor of visual programming language, afterall of the required normal blocks are added to the graph, user cannotconstruct a continual vertical line across multiple nodes by using onlyone operation to fast adjust the connection relationship of multiplenormal blocks. Due to above limitation, it is hard for user to constructa complicated graph with lots of normal blocks and complex connectionrelationship.

SUMMARY OF THE INVENTION

One of objects of the present invention is to provide a method forediting continual vertical line of visual programming language to allowuser to construct a continual vertical line across multiple nodes byusing only one operation, thus fast adjust the connection relationshipof multiple normal blocks and update the graph.

Accordingly, the present invention provides a method for editingcontinual vertical line of visual programming language and applied to aneditor. The method comprise: entering an editing mode; obtaining asource node on the serial-parallel graph comprising a plurality ofnormal blocks and the source node being an endpoint of one of the normalblocks; calculating and displaying at least one candidate node aroundthe current node wherein the at least one candidate node is an endpointof at least one of the normal blocks around the current node; connectingthe current node to one of the at least one candidate nodes; convertingthe connected candidate node into a connected node; determining whetherthe editor exits the editing mode; setting the connected node as thecurrent node and continually calculating, displaying and connecting oneor more candidate node before exiting the editing mode; generating acontinuous vertical line connecting the source node and at least one ofthe connected nodes when exiting the editing mode; and modifying aserial-parallel relationship of the normal blocks based on thecontinuous vertical line and updating the serial-parallel graph.

By above editing method of the present invention, user only needsone-time operation to directly generate a continuous vertical line ingraph, thus fast modify the connection relationship among normal blocksby using the continuous vertical line and update the graph at the sametime. User may use the editor of visual programming language moreefficiently.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1A shows the first construction operation for the continualvertical line according to the first embodiment of the presentinvention.

FIG. 1B shows the second construction operation for the continualvertical line according to the first embodiment of the presentinvention.

FIG. 1C shows the third construction operation for the continualvertical line according to the first embodiment of the presentinvention.

FIG. 2 shows the editing flowchart according to the first embodiment ofthe present invention.

FIG. 3A shows the first construction operation for the continualvertical line according to the second embodiment of the presentinvention.

FIG. 3B shows the second construction operation for the continualvertical line according to the second embodiment of the presentinvention.

FIG. 3C shows the third construction operation for the continualvertical line according to the second embodiment of the presentinvention.

FIG. 3D shows the fourth construction operation for the continualvertical line according to the second embodiment of the presentinvention.

FIG. 3E shows the fifth construction operation for the continualvertical line according to the second embodiment of the presentinvention.

FIG. 3F shows the sixth construction operation for the continualvertical line according to the second embodiment of the presentinvention.

FIG. 3G shows the seventh construction operation for the continualvertical line according to the second embodiment of the presentinvention.

FIG. 4 is the schematic view showing the retreating of the vertical lineaccording to the first embodiment of the present invention.

FIG. 5A is the first part of the editing flowchart according to thesecond embodiment of the present invention.

FIG. 5B is the second part of the editing flowchart according to thesecond embodiment of the present invention.

FIG. 5C is the third part of the editing flowchart according to thesecond embodiment of the present invention.

FIG. 6A shows the first construction operation for the continualvertical line according to the third embodiment of the presentinvention.

FIG. 6B shows the second construction operation for the continualvertical line according to the third embodiment of the presentinvention.

FIG. 6C shows the third construction operation for the continualvertical line according to the third embodiment of the presentinvention.

FIG. 6D shows the fourth construction operation for the continualvertical line according to the third embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE INVENTION

Reference will now be made to the drawing figures to describe thepresent disclosure in detail. It will be understood that the drawingfigures and exemplified example of present disclosure are not limited tothe details thereof.

The present invention provides a method for editing continual verticalline of visual programming language (hereinafter briefed as editingmethod), and the editing method is applied to editor of all kinds ofvisual programming languages and the editor is run on a computer.

Refer now to FIGS. 1A, 1B, and 1C, which respectively show the firstconstruction operation, the second construction operation and the thirdconstruction operation of the first embodiment of the present invention.

As shown in FIG. 1A, after user operates computer and runs the visualprogramming language editor on the computer, user can operate the editorand add one or more normal block 2 into the editor with the editingtools (not shown) of the editor, and construct a serial-parallel graphic(hereafter briefed as graph 1) with the normal blocks 2.

More specifically, after multiple normal blocks 2 are added to theeditor, user may construct a continue block 21 with serially-connectedblocks and construct a branch block 22 with the parallel-connectedcontinue blocks 21.

As shown in FIG. 1B, according to one aspect of the present invention,user may operate human machine interface such as mouse, keyboard ortouch pad of the computer to operate the editor to connect the multiplenodes 23 in graph 1, where each of the nodes 23 is corresponding to anendpoint of each normal block 2. It should be noted that, according tothe present invention, user may complete the connection of the multiplenodes 23 in graph 1 by one operation (for example user just operates themouse, keyboard or touch pad of the computer for one time).

As shown in FIG. 1C, after user completes the connection of the multiplenodes 23 in graph 1 by one operation, the editor may generate acontinual vertical line 3 according to the multiple connected nodes 23and modify the seral-parallel relationship of the multiple normal blocks2 in the graph 1 based on the continual vertical line 3. The editorfurther updates the graph 1 and displays the updated graph 1.

In the present invention, user only needs one operation to construct acontinuous vertical line 3 across multiple nodes 23 to complete thework, where prior art editor needs successive and multiple commands.

More particularly, as shown in FIG. 1C, after the continuous verticalline 3 is generated by the editor according to user operation, theeditor may re-organize the graph 1. Therefore, the normal blocks 2 onthe left side of the continuous vertical line 3 are re-organized as anew branch block 22, the normal blocks 2 on the right side of thecontinuous vertical line 3 are also re-organized as a new branch block22, and the editor parallel connects the two new branch blocks 22.Finally, the graph 1 is updated according to the new seral-parallelrelationship of the updated normal blocks 2.

As shown in FIGS. 1B and 1C, the continuous vertical line 3 comprisesmultiple vertical line segments. However, in the present invention, useronly needs one operation to directly generate the continuous verticalline 3 instead of sending successive commands (multiple operations),thus greatly enhance the convenience of the editor.

It should be noted that even the present invention is exemplified withladder diagram editor in FIGS. 1A to 1C, however, the scope of thepresent invention is not limited by this specific example.

FIG. 2 shows the editing flowchart according to the first embodiment ofthe present invention. FIG. 2 discloses the specific editing steps ofthe editing method of the present invention. After the visualprogramming language editor executes the steps shown in FIG. 2, theeditor may modify the serial-parallel relationship of the normal blocks2 of the graph 1 similar to the examples shown in FIGS. 1A to 1C andupdates the graph 1 as well as re-displays the updated graph 1.

At first, the editor receives external operation from user (such as thefirst external operation) to enter the editing mode (step S10). In thisembodiment, the user may operate the editor to add normal blocks 2 ofdesired number and desired types in graph 1 and then operate the editorto enter the editing mode to generate the continuous vertical line andto modify the serial-parallel relationship of the normal blocks 2 of thegraph 1 according to the continuous vertical line 3 as well as to updatethe graph 1.

After the editor enters the editing mode, the user may operate thecomputer (for example operating the mouse, the keyboard or the touchpad) to select a source node (or referred to as start node) from thegraph, where the source node is the endpoint of any normal block 2 inthe graph 1 (S12). After the step S12, the editor sets the user-selectedsource node as the current node and generates the continuous verticalline 3 from the current node. In this embodiment, the current node isthe current position of the cursor (such as mouse pointer) hovering inthe screen of the editor, where the cursor is controlled by mouse,keyboard or touch pad.

It should be noted that the editor may add the current position of thesource node to a queue (not shown) after the source node is confirmed,thus the position of the source node of the continuous vertical line 3can be recorded, which will be detailed later.

After step S12, the editor may calculate one or more effective candidatenode around the current node and mark the candidate node on the graph 1with specific symbol (step S14). In this embodiment, the candidate nodeis the end point of one or more normal block 2 around the current node.More particularly, the effective candidate node in this embodiment isthe node that will not cause short circuit of any normal block when usergenerates a connection line connecting the current node and theeffective candidate node.

For example, if ten nodes are around the current node and there arethree nodes causing short circuit of any normal block 2 after they areconnected with the current node, the editor will mark the seven nodes,which will not cause short circuit of any normal block, on the graph asthe candidate nodes.

It should be noted that the editor may monitor the operation of user(such as monitor the current location of the cursor), then calculatesand displays one or more candidate nodes around the current node onlywhen the cursor moves from the current node and the moving distance ofthe cursor is larger than a threshold value, thus prevent the erroneousclick (operation) of user.

Besides, when the editor monitors user operation, the editor furtherdetermines the moving direction of the cursor moving from the currentnode. In this embodiment, the editor only calculates and displays one ormore candidate nodes above the current node when the moving direction isupward, and only calculates and displays one or more candidate nodesbelow the current node when the moving direction is downward. Therefore,the editor can prevent from displaying excessive candidate nodes, whichwill confuse the user.

After the step S14, the editor already displays one or more effectivecandidate nodes, which is connectable, on the graph 1 and the editor mayreceive again the external operation of user (such as the secondexternal operation) to connect the current node to one of the displayedcandidate nodes (step S16).

For example, if the computer equipment currently operated by user iscomputer mouse, then the user may drag the mouse to move the cursor tothe source node (namely the current node), press the left button of thecomputer mouse, and drag the cursor to the location of any one candidatenode from the source node, thus connect the source node (namely thecurrent node) to the candidate node.

For another example, if the computer equipment currently operated byuser is keyboard, then the user may move the cursor to the location ofthe current node by arrow key and then press special function key (orshortcut key) to lock the source node. Afterward, the user may move thecursor to the location of any one candidate node from the source node byoperating the arrow key, thus connect the source node to the candidatenode.

However, the above description is only for explaining the embodiments ofthe present invention and is not limitation for the scope of the presentinvention.

After user connects the current node to any of the candidate nodes byoperating the mouse, keyboard or touch pad, the editor converts theconnected candidate node to connected node (step S16).

It should be noted that the editor adds the location of the connectednode to the queue when any candidate node is converted to connectednode. Therefore, the location of the nodes passed by the continuousvertical line 3 and/or the location of the end node can be recorded.

In one embodiment, the editor uses dashed line to display one or moreeffective candidate node and uses solid line to display the connectednode. In another embodiment, the editor uses a first color (such asgreen) to display one or more effective candidate node and uses a secondcolor (such as blue) to display the connected node. By above displaymanner to distinguish between effective candidate node and the connectednode, user can easily generate the continuous vertical line 3 by usingthe editor.

It should be noted that the editor may selectively generate and displaya pre-connection line (such as the pre-connection line 5 shown in FIGS.3C and 3D) connecting the current node and the connected node in stepS20 such that the user may easily visualize the construction of thecontinuous vertical line 3.

During the construction of the continuous vertical line, the editorcontinually determines whether it receives external operation (such asthe third external operation) of user command to exit the editing mode(step S22). The editor sets the last connected node as the current modebefore receiving the third external operation and then repeats theexecution of steps S14 to S20 to continually perform the construction ofthe continuous vertical line 3.

In one embodiment, user may operate mouse to perform the construction ofthe continuous vertical line 3. In this embodiment, the first externaloperation keeps pressing the button of the computer mouse (namely, theeditor enters the editing mode when user keeps pressing mouse button);the second external operation drags the mouse pointer by moving themouse with mouse button being kept pressing (namely, the user drags themouse to connect two nodes); the third external operation releases mousebutton (namely, the editor exits editing mode when user release mousebutton).

In another embodiment, the user operates the keyboard to perform theconstruction of the continuous vertical line 3. In this embodiment, thefirst external operation presses a special function key or shortcut key(namely, the editor enters the editing mode when user presses thespecial function key); the second external operation presses arrow keys(namely, the user moves cursor with arrow key to connect two nodes); thethird external operation presses again the special function key (namely,the editor exits editing mode when user presses again the specialfunction key).

The above examples are used for demonstrating the present invention andare not limitation of the present invention. For example, the editor mayenter editing mode when user keeps pressing a specific key (such as ALTkey), and exits the editing mode when the specific key is released. Foranother example, the editor may enter editing mode when user presses aspecific button of mouse (such as left button), and exit the editingmode when the specific button is pressed again.

In other embodiment, the user may also operate the touch screen or touchpad of computer to perform the construction of the continuous verticalline 3. In this embodiment, the first external operation, the secondexternal operation, and the third external operation may have similaroperations with the previous examples, and the detailed description isomitted here for brevity.

In step S22, if the editor receives the third external operation to exitthe editing mode, the editor generates the continuous vertical line 3connecting the source node and all of the connected nodes in real time(step S24), modifies the serial-parallel relationship of the normalblocks 2 on the graph 1 at the same time, and then updates and displaysthe graph 1 (step S26).

It should be noted that in steps S24 to S26, the editor mainly obtainsthe source node and one or more connected node stored in the queue, andgenerates the continuous vertical line 3 based on those nodes. Besides,the editor further modifies the serial-parallel relationship of thenormal blocks 2 based on the nodes stored in the queue and then updatesthe graph 1, which will be described in more detail later.

Refer also to FIGS. 3A to 3G, which show the first constructionoperation to the seven construction operation for the continuousvertical line according to the second embodiment. In the embodimentshown in FIGS. 3A to 3G, user uses single operation of mouse to generatea continuous vertical line, but this is not limitation of the presentinvention.

First as shown in FIG. 3A, user may operate the editing tool (not shown)of the editor to add a plurality of normal blocks 2 of desired numberand type into the graph 1. In the embodiment shown in FIG. 3A, initiallythe graph 1 includes a first continue group (serial group) having normalblocks B0, B1, B2 and B3; a second continue group (serial group) havingnormal blocks B4, B5, B6 and B7; a third continue group (serial group)having normal blocks B8, B9, B10 and B11; and a fourth continue group(serial group) having normal blocks B12, B13, B14 and B15. Besides, thefirst continue group, the second continue group, the third continuegroup and the fourth continue group are parallel connected to eachother.

As shown in FIG. 3A, each normal block 2 has endpoints L0-L11 at theserial junction. In the present invention, user may select the sourcenode of the continuous vertical line 3 from the endpoints L0-L11, andthe editor calculates one or more candidate node satisfying certaincondition from the endpoints L0-L11. In other word, the editing methodof the present invention can prevent the circuit error caused by usererroneously setting the continuous vertical line 3 on the normal block2.

Afterward, as shown in FIG. 3B, user may operate mouse to control cursorin the screen to place the pointer at any endpoint, and then press mousebutton (such as left button) to convert this endpoint to the source node41. In this embodiment, user selects the endpoint LO as the source node41 and the editor stores the endpoint L0 in the queue Q.

After user selects a source node 41 the user keeps pressing mouse buttonto drag the pointer such that the pointer moves downward and the movingdistance is larger than a threshold. At this time, the editor istriggered to calculate one or more effective candidate nodes 42 belowthe source node 41 and to display the one or more effective candidatenodes 42.

In one embodiment, the editor uses solid line to display the source node41 and uses dashed line to display the candidate nodes 42. In anotherembodiment, the editor uses different colors to display the source node41 and the candidate nodes 42 such that user may quickly distinguishbetween the two kinds of nodes.

Afterward, as shown in FIG. 3C, user keeps dragging the pointer to movethe cursor to one candidate node 42 (such as the endpoint L4 shown inFIG. 3C), then the editor adds the candidate node 42 (namely theendpoint L4) in queue Q and converts the candidate node 42 to connectednode 43. When the pointer is further moved downward and the movingdistance is larger than the threshold, the editor is triggered tocalculate and display one or more effective candidate node 42 below theconnected node 43.

In one embodiment, the editor displays the connected node 43 with solidline. In another embodiment, the editor uses different colors to displaythe candidate node 42 and the connected node 43, for example green forthe candidate node 42 and blue for the connected node 43. In stillanother embodiment, the editor uses the same color or shape to displaythe candidate node 42 and the connected node 43.

Afterward, as shown in FIG. 3D, the user may keep dragging the pointerto successively connect a plurality of candidate nodes 42 to convertthose candidate nodes 42 into connected nodes.

Furthermore, as shown in FIGS. 3C and 3D, when user drags the pointer toconnect two nodes, the editor displays a pre-connection line 5 for thetwo nodes on the graph 1 such that the user can quickly visualize thecurrent connection status.

In the embodiment shown in FIG. 3D, user drags the pointer from theendpoint LO and then passes the endpoint L4, the endpoint L6 and theendpoint L11. Therefore, the editor will set the endpoint LO as thesource node and then sequentially convert the endpoint L4, the endpointL6 and the endpoint L11 into connected nodes 43. The editor also addsthe endpoint L0, the endpoint L4, the endpoint L6 and the endpoint L11into queue Q. When user releases mouse button to exit the editor fromthe editing mode, the editor may generate the continuous vertical line 3based on the record of the endpoints in the queue Q.

As shown in FIG. 3E, when user releases mouse button, the editordetermines that user ends the editing task (namely exit editing mode),then the editor fetches the first two endpoints of the queue Q, namely,the endpoints L0 and L4 and removes the first endpoint of the queue Q,namely the endpoint L0.

Afterward, the editor constructs a first cut line 31 based on theendpoints L0 and L4, sets one or more normal block 2 on the left side ofthe start point (namely the endpoint L0) of the first cut line 31 as thefirst left group and sets one or more normal block 2 on the right sideof the starting point of the first cut line 31 as the first right group.The editor further sets one or more normal block 2 on the left side ofthe end point (namely the endpoint L4) of the first cut line 31 as thesecond left group and sets one or more normal block 2 on the right sideof the start point of the first cut line 31 as the second right group.Furthermore, the editor parallel connects the first left group with thesecond left group, parallel connects the first right group with thesecond right group, and finally serial connects the two parallelconnection results through the first cut line 31.

As mentioned above, the editor removes the first endpoint (namely theendpoint L0) in the queue Q, therefore, only the endpoint L4, theendpoint L6 and the endpoint L11 remain in the queue Q after the firstcut line 31 is constructed.

Afterward, as shown in FIG. 3F, the editor fetches again the first twoendpoints (namely the endpoints L4 and L6) in the queue Q and removesthe first endpoint (namely the endpoint L4) in the queue Q.

Afterward, the editor constructs a second cut line 32 based on theendpoints L4 and L6 and then updates the serial-parallel relationship ofthe normal blocks 2 with similar process mentioned above. As mentionedabove, the editor removes the first endpoint (namely the endpoint L4) inthe queue Q, therefore, only the endpoint L6 and the endpoint L11 remainin the queue Q after the second cut line 32 is constructed.

As shown in FIG. 3G, the editor fetches again the first two endpoints(namely the endpoints L6 and L11) in the queue Q and removes the firstendpoint (namely the endpoint L6) in the queue Q after constructing thesecond cut line 32.

Afterward, the editor constructs a third cut line 33 based on theendpoints L6 and L11 and then updates the serial-parallel relationshipof the normal blocks 2 with similar process mentioned above.

As mentioned above, the editor will remove the first endpoint in thequeue Q (namely the endpoint L6) after constructing the third cut line33. Therefore, only one endpoint L11 remains in the queue Q afterconstructing the third cut line 33. Because one endpoint cannotconstitute a cut line, the editor will end the construction of the cutline and set the last endpoint L11 in the queue Q as the end node of thecontinuous vertical line 3. In this way, the editor may generate thecontinuous vertical line 3 by the first cut line 31, the second cut line32 and the third cut line 33.

By the present invention, user may use single operation (such as theoperation from pressing left button of mouse to releasing left button ofmouse) in editing mode to generate a continuous vertical line 3 passing(connecting) a plurality of nodes, which is very convenient for user.

FIG. 4 is the schematic view showing the retreating of the verticalline. During the construction of the continuous vertical line 3 (namelythe editor is still in the editing mode), the user may control thepointer backward at his disposal (namely moving the pointer toward thesource node 41). When the editor determines that the pointer is movedtoward the source node 41 and already leaves the connected node 43, theeditor converts the connected node 43 into candidate node 42 as shown inFIG. 4 and then displays the converted candidate node 42 with othercandidate node 42 on the graph 1.

As mentioned above, when a candidate node 42 is converted into aconnected node, the editor will store the connected node (such as theendpoint L11) into queue Q. When user moves back the pointer to convertthe connected node 43 into candidate node 42, the editor will remove thecandidate node 42 (such as the endpoint L11) from the queue Q to rendermore flexibility to user for drawing.

FIGS. 5A to 5C respectively show the first flowchart, the secondflowchart and the third flowchart of the editing method. Hereinafter thedetailed steps for the editing method will be described with alsoreference to FIGS. 3A to 3G.

At first the editor receives a first external operation of user to enterthe editing mode (step S30). In one embodiment, the user keeps pressingthe button of mouse to execute the first external operation. In anotherembodiment, the user presses a special function key of the keyboard toexecute the first external operation.

In the editing mode, according to user operation, the editor selects theendpoint of any normal block 2 on the graph 1 as the source node 41(step S32). In one embodiment, the editor may set the endpointcorresponding to the current location of the computer cursor (such asmouse pointer) as source node 41, but this is not limitation for thepresent invention.

After ensuring the source node 41, the editor clears the record of allnodes in queue Q (step S34). Afterward, the editor receives a secondexternal operation of user to move the cursor from the source node 41and calculates the moving distance of the cursor (step S36). In oneembodiment, user drags the mouse to execute the second externaloperation. In another embodiment, user presses arrow key of the keyboardto execute the second external operation.

After step S36, the editor further determines whether the movingdistance is larger than a preset threshold (step S38). The editorperforms no further action if the moving distance is not larger than thepreset threshold and the editor repeats above step before exiting theediting mode. The editor adds the source node 41 into queue Q (step S40)if the moving distance is larger than the preset threshold. Moreparticularly, in step S40, the editor adds the number of the endpoint onwhich the source node hovers into the queue Q from back end of the queueQ and then sets the source node 41 as the current node for the cursor.

In this embodiment, the editor determines the moving direction of thecursor from the source node based on the second external operation ofuser, namely, determines whether the moving direction of the cursor isupward or downward (step S42). If the cursor, controlled by user, ismoved downward with respect to the current node and the moving distanceis larger than the preset threshold, the editor only calculates anddisplays one or more effective candidate node 42 below the current node(step S44). On the contrary, if the cursor is moved upward with respectto the current node and the moving distance is larger than the presetthreshold, the editor only calculates and displays one or more effectivecandidate node 42 above the current node (step S46).

As mentioned above, the effective candidate node 42 in this presentinvention is the endpoint that the editor finds no short circuit for anynormal block when the current node is connected to this endpoint.

The editor keeps determining whether it receives a third externaloperation sent by user to exit the editing mode (step S48). In oneembodiment, user releases mouse button to execute the third externaloperation. In another embodiment, user presses again the specialfunction key of computer keyboard to execute the third externaloperation. If the editor does not receive the third external operation,the editor performs the steps shown in FIG. 5B. If the editor receivesthe third external operation, the editor performs the steps shown inFIG. 5C to exit the editing mode.

As shown in FIG. 5B, the editor determines whether user moves the cursorby performing the second external operation and user hovers the cursorat any candidate node 42 (step S50). If user moves the cursor and thecursor hovers at any candidate node 42, the editor adds the candidatenode 42 into queue Q to convert the candidate node 42 into connectednode (step S52). On the contrary, if the cursor does not hover on anycandidate node 42, the editor does not perform any further action.

More particularly, in step S52, if the cursor is moved and hovers at anycandidate node 42 by user operation, the editor stores the number of theendpoint corresponding to the location of the candidate node 42 into thequeue Q from the back end of the queue Q such that the candidate node 42is recorded as connected node 43.

Besides, the editor further determines whether the cursor is controlledby user to move backward and leave any connected node 43 (step S54).When the editor determines that the cursor is moved backward (namelymoving toward the source node 41) and leave a connected node 43, theeditor converts the connected node 43 into the candidate node 42 andremoves the candidate node 42 from the queue Q from the back end of thequeue Q (step S56).

More particularly, in step S56, the editor removes the number of theendpoint corresponding to the location of the candidate node 42 from thequeue Q.

Before exiting the editing mode, the editor returns to step S42 tocontinually calculate and display currently available candidate node 42,convert the candidate node 42 passed by the cursor into connected node43 and convert (resume) the connected node 43 (not passed by the cursor)back to the candidate node 42.

As shown in FIG. 5C, if the editor exits the editing mode based on thethird external operation of user, then the editor first fetches thequeue Q and determines whether the number of nodes stored in the queue Qis larger than one (step S58). In the present invention, if the numberof nodes stored in the queue Q is larger than one (namely at least twonodes), then the editor may construct the cut lines 31-33 as shown inFIGS. 3E to 3G based on these two nodes. If the number of nodes storedin the queue Q is not larger than one (namely only one node or no node),the editor ends the construction of the continuous vertical line.

In step S58, if the number of nodes stored in the queue Q is larger thanone, the editor fetches the first two nodes in the queue Q and removesthe record of the first node in the queue Q (step S60). Moreparticularly, the editor uses the “peek” command to check the first twonodes in the queue Q from the front end of the queue Q, and uses the twonodes as the start point and endpoint for the cut line. The editor usesthe “pop” command to remove the first node in the queue Q from the frontend of the queue Q to set the endpoint of the current cut line as thestart point of the next cut line, or as the end node of the continuousvertical line.

After step S60, the editor constructs a first cut line based on thefetched two nodes, sets one or more normal block 2 on the left side ofthe start point of the cut line as the first left group and sets one ormore normal block 2 on the right side of the start point of the cut lineas the first right group. The editor further sets one or more normalblock 2 on the left side of the endpoint of the cut line as the secondleft group, and sets one or more normal block 2 on the right side of theendpoint of the cut line as the second right group (step S62). In otherword, based on the start point and the endpoint of the cut line, theeditor separates the continue blocks of the graph 1 into left group andright group in step S62.

After step S62, the editor further parallel connects the first leftgroup and the second left group to generate the first branch (parallel)group (step S64), and parallel connects the first right group and thesecond right group to generate the second branch (parallel) group (stepS66).

More particularly, in step S64, the editor parallel connects the firstleft group and the second left group to generate the new branch groupbased on the common start point (the leftmost part of the graph 1) andthe cut line. In step S66, the editor parallel connects the first rightgroup and the second right group to generate the new branch group basedon the common endpoint (the rightmost part of the graph 1) and the cutline.

After step S66, the editor further serial connects the first branchgroup with the second branch group to form new continue (serial) group(step S68).

Afterward, the editor is back to step S58 to determine whether thenumber of the node remaining in the queue Q is larger than one after theabove-mentioned cut line is generated. The editor re-executes steps S60to S68 to generate the next cut line if the number of the nodesremaining in the queue Q is larger than one. The editor modifies theserial-parallel relationship of the normal blocks in the graph 1 basedon the one or more new branch (parallel) group, and the editor thenupdates and displays the graph 1 (step S70).

The above example is exemplified with pointer of computer mouse.However, the editing method of the present invention can also beimplemented by computer keyboard.

Refer also to FIGS. 6A to 6D, which show the first constructionoperation to the fourth construction operation for the continuousvertical line according to the third embodiment.

As shown in FIG. 6A, after entering the editing mode, user may operatethe arrow key of keyboard to move cursor of the editor and select one ofthe endpoints as the source node 61. After user selects the source node61, the editor may display, after calculation, one or more effectivecandidate nodes 62 around the source node 61, where the source node 61and the candidate nodes 62 may be represented with different colors ordifferent shapes.

Afterward, as shown in FIGS. 6B and 6C, user may use arrow key ofkeyboard to move the cursor from the source node 61 to any candidatenode 62. The editor converts the candidate node 62 on which the cursorhovers into connected node 63 and generates a pre-connection line 7between the two nodes 61 and 63. When one candidate node 62 is convertedinto connected node 63, the editor further calculates and displays oneor more effective candidate node 62 around the connected node 63.

Finally, as shown in FIG. 6D, when user sends command through keyboardto control the editor exit the editing mode, the editor generates thecontinuous vertical line 8 based on the source node 61 and one or moreconnected node 63, and modifies the serial-parallel relationship of thenormal blocks in the graph 1 based on the continuous vertical line 8.The editor updates and displays the graph 1.

By above editing method of the present invention, user only needsone-time operation by mouse, keyboard or touch pad to directly generatea continuous vertical line in graph, thus fast modify the relationshipamong normal blocks. User may use the editor of visual programminglanguage more efficiently.

Although the present invention has been described with reference to thepreferred embodiment thereof, it will be understood that the presentinvention is not limited to the details thereof. Various substitutionsand modifications have been suggested in the foregoing description, andothers will occur to those of ordinary skill in the art. Therefore, allsuch substitutions and modifications are intended to be embraced withinthe scope of the present invention as defined in the appended claims.

What is claimed is:
 1. A method for editing continual vertical line ofvisual programming language, the method applied to an editor operated ona computer, the editor providing a serial-parallel graph comprising aplurality of normal blocks, the method comprising: a) receiving a firstexternal operation to enter an editing mode; b) obtaining a source nodeon the serial-parallel graph when entering the editing mode, and settingthe source node as a current node, wherein the source node is anendpoint of one of the normal blocks; c) displaying at least onecandidate node around the current node, wherein the at least onecandidate node is an endpoint of at least one of the normal blocksaround the current node; d) receiving a second external operation toconnect the current node to one of the at least one candidate nodes; e)converting the connected candidate node into a connected node; f)determining whether a third external operation for exiting the editingmode is received; g) setting the connected node as the current node andrepeating the step c) to the step f) before exiting the editing mode; h)generating a continuous vertical line connecting the source node and atleast one of the connected nodes when exiting the editing mode; and i)modifying a serial-parallel relationship of the normal blocks based onthe continuous vertical line and updating the serial-parallel graph. 2.The method in claim 1, wherein the first external operation is performedby continuously pressing a button of a mouse of the computer, the secondexternal operation is performed by moving the mouse for dragging apointer, the third external operation is performed by releasing thebutton of the mouse.
 3. The method in claim 1, wherein the firstexternal operation is performed by pressing a special function key of akeyboard of the computer, the second external operation is performed bypressing an arrow key of the keyboard, and third external operation isperformed by pressing again the special function key of the keyboard. 4.The method in claim 1, wherein in the step h), the continuous verticalline is generated based on the source node stored in a queue of theeditor and the connected candidate nodes stored in the queue.
 5. Themethod in claim 1, wherein in the step i), the serial-parallelrelationship of the normal blocks is modified based on the source nodestored in a queue of the editor and the connected candidate nodes storedin the queue.
 6. The method in claim 5, wherein the step i) comprisesfollowing sub-steps: i1) determining whether a number of the nodesstored in the queue is larger than one; i2) fetching first two nodes inthe queue and then removing a first node in the queue when the number ofthe nodes stored in the queue is larger than one; i3) after the sub-stepi2), generating a cut line based on the two fetched nodes, setting oneor more normal block on a left side of a start point of the cut line asa first left group, setting one or more normal block on a right side ofthe start point of the cut line as a first right group, setting one ormore normal block on a left side of an endpoint of the cut line as asecond left group, setting one or more normal block on a right side ofthe endpoint of the cut line as a second right group; i4) after thesub-step i3), parallel connecting the first left group and the secondleft group to form a first branch group; i5) after the sub-step i3),parallel connecting the first right group and the second right group toform a second branch group; i6) serially connecting the first branchgroup and the second branch group to form a new continue group; i7)after the sub-step i6), repeating the sub-steps i1) to i6); and i8)modifying the serial-parallel relationship of the normal blocks based onone or more new continue group and updating the serial-parallel graph ifthe number of the nodes stored in the queue is not larger than one. 7.The method in claim 6, wherein the sub-step i2) the first two nodes inthe queue are fetched with peek command to obtain the first two nodes asthe start point and the endpoint of the cut line, the first node in thequeue is removed with pop command.
 8. The method in claim 1, furthercomprising a step b1) after the step b): adding the source node to aqueue of the editor.
 9. The method in claim 8, further comprising a stepb0) before the step b1): clearing the queue.
 10. The method in claim 8,further comprising following steps after the step b): b21) calculating amoving distance from the current node; b22) determining whether themoving distance is larger than a threshold; and b23) performing the stepc) when the moving distance is larger than the threshold.
 11. The methodin claim 8, further comprising a step b3) after the step b): determininga moving direction departing from the source node; wherein at least oneof the candidate nodes above the current node is displayed when themoving direction is upward; wherein at least one of the candidate nodesbelow the current node is displayed when the moving direction isdownward.
 12. The method in claim 1, wherein the candidate node is aneffective candidate node not causing short circuit of one or more normalblock in the serial-parallel graph.
 13. The method in claim 1, whereinthe candidate node is displayed with dashed line, and the connected nodeis displayed with solid line.
 14. The method in claim 1, wherein thecandidate node is displayed with a first color, and the connected nodeis displayed with a second color.
 15. The method in claim 1, wherein inthe step e), the connected candidate node is added to a queue of theeditor to convert the connected candidate node into the connected node.16. The method in claim 15, wherein in the step e), the candidate nodeis added to the queue from a back end of the queue when the editorreceives the second external operation and a cursor hovers on anycandidate node.
 17. The method in claim 16, further comprising followingsteps after the step e): e1) determining whether the cursor is movedback and leaves the connected node (43); and e2) resuming the connectednode to the candidate node and removing the candidate node from the backend of the queue when the cursor is moved back and leaves the connectednode.